import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import AutoImport from 'unplugin-auto-import/vite'
const CUSTOM_TAG = ['water-mark-camera']
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    uni({
      vueOptions: {
        template: {
          compilerOptions: {
            isCustomElement: tag => CUSTOM_TAG.includes(tag), //这样就可以让编译器知道哪些是自定义组件
          },
        },
      },
    }),
    AutoImport({
      imports: ['vue', 'uni-app', 'pinia'],
      dts: 'src/@types/auto-imports.d.ts',
      eslintrc: {
        enabled: true,
      },
    }),
  ],
  base:'./'
})
